<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>君鉴仪器交易投资平台</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<link rel="stylesheet" href="__STATIC__/easyui/themes/default/easyui.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<!--[if lt IE 9]>
<script type="text/javascript" src="__STATIC__/jquery1.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script type="text/javascript" src="__STATIC__/jquery2.min.js"></script>
<!--<![endif]-->
<script type="text/javascript" src="__STATIC__/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer/layer.min.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>

<script type="text/javascript">
	var tabsopen = new Array();
	function closeTab(title, allTitle, msg) {

		var tt = $('#main-center');
		var spanTitle = title;
		if (allTitle) {
			spanTitle = "<span title=\"" + allTitle + "\">" + title + "</span>";
		} else {
			spanTitle = "<span title=\"" + title + "\">" + title + "</span>";
		}
		tt.tabs('close', spanTitle);
		if (msg) {
			alert(msg);
		}
	}
	function addTab(title, templateId, href, allTitle) {
		//var sAllTitle = allTitle ? allTitle : "" ;
		var spanTitle = title;
		if (allTitle) {
			//选框 显示  内容allTitle
			spanTitle = "<span title=\"" + allTitle + "\">" + title + "</span>";
		} else {
			//如果 不填 显示title
			spanTitle = "<span title=\"" + title + "\">" + title + "</span>";
		}
		var tt = $('#main-center');
		//这种处理防止是只要存在某个tab就关闭它然后再打开
		if (tt.tabs('exists', spanTitle)) {
			tt.tabs('close', spanTitle);
			addTab(title, templateId, href, allTitle);

		} else {
			var _content = "";
			if (href) {
				/*
				var loadi = layer.load(0);
				var content='';
				$.ajax({
					async: false,
					type : "GET",
					url : href,
					success : function(data) {
						_content= "<div id=\""+templateId+"\">"+data+"</div>";
						layer.close(loadi);
					}
				});
				*/
				/*iframe*/
				_content = '<iframe id="'
					+ templateId
					+ '" name="'
					+ templateId
					+ '" scrolling="yes" frameborder="0"  src="'
					+ href + '" style="width:100%;height:100%;"></iframe>';

			} else {
				_content = '未实现';
			}
			tt.tabs('add', {
				title: spanTitle,
				closable: true,
				content: _content,
				cache: true
			}).bind('contextmenu', function(e) {
				$('#mm').menu('show', {
					left: e.pageX,
					top: e.pageY
				});
				return false;
			}).dblclick(function() {
				var currTab = tt.tabs('getSelected');
				var currtab_title = currTab.panel('options').title;
				if (currtab_title != '<div id=mb >首页导航</div>')
					tt.tabs('close', currtab_title);

			});
			tabsopen[tabsopen.length] = spanTitle;
		}
	}

	$(function() {
		$("#treeNav li").click(function(e) {
			var title = $.trim($(this).html());
			addTab(title, 'I' + this.id, this.title);
			e.stopPropagation();
		});
		$("#treeNav div").click(function() 
		{
			if ($(this).find('ul').css('display') == 'none') {
				$('#treeNav div').each(function(){
					$(this).find('div').removeClass('open');
					$(this).find('ul').hide();
				});
				$(this).find('ul').show();
			}
			else {
				$(this).find('ul').hide();
			}
			$(this).find('div').toggleClass('open');
		});
		clockon();
	});

	function logOut() {
		var outUrl = "{:U('Public/logout')}";
		myConfirm('确定要退出系统么？',8,function(){location.href = outUrl;});
	}
	function help()
	{
		myAlert('建设中...');
	}	
</script>
</head>
<body class="easyui-layout">
    <div id="top" region="north" border="0">
		<div class="logo"></div>
		<div class="top_r">
			<div id="top_menu_box">
				<a onclick="help()" href="#">帮助中心</a>
				<a onclick="logOut();" href="#" class="logout">退出系统</a>
			</div>
			<div class="cl"></div>
			<div style="float: right;" id="time"></div>
		</div>
    </div>
    <div region="west" split="" title="导航菜单" style="width: 182px; padding: 1px;">
        <div id="treeNav">
			{$__MENU__}
		</div>
    </div>
    <div region="center" style="background: #E6F6FF;" id="center">
        <div id="main-center" title="双击操作：关闭所有" class="easyui-tabs" fit="true" border="0">
            <div title="<div id=mb >首页导航</div>">
                <div id="dddd" style="width: 100%; height: 100%;text-align: center;
                    vertical-align: middle;background-color:#E6F6FF;">
                    <div>test</div>
                </div>
            </div>
        </div>
    </div>
    <div id="bottom" region="south" style="height: 36px;">
        <div style="font-size: 13px;">
            卓战友欢迎您进入系统,您有8个待办事宜.
        </div>
    </div>
</body>
</html>